package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.Map;

public class ProductStorageOut {
    private String id;

    private String storageOutType;

    private String storageOutCode;

    private String relateId;

    private String storageOutTime;

    private String storageOutUser;

    private String storageOutCount;

    private String storageOutStatus;

    private String status;

    private Date createTime;

    private Date updateTime;


    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "待出库", "1", "已出库");


    public static final transient Map<String, String> TYPESTATUSMAP =
            ImmutableMap.of("1", "销售", "2", "报废","3", "清理");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getStorageOutTypeCn() {
        return TYPESTATUSMAP.get(getStorageOutType());
    }
    public String getStorageOutType() {
        return storageOutType;
    }

    public void setStorageOutType(String storageOutType) {
        this.storageOutType = storageOutType == null ? null : storageOutType.trim();
    }

    public String getStorageOutCode() {
        return storageOutCode;
    }

    public void setStorageOutCode(String storageOutCode) {
        this.storageOutCode = storageOutCode == null ? null : storageOutCode.trim();
    }

    public String getRelateId() {
        return relateId;
    }

    public void setRelateId(String relateId) {
        this.relateId = relateId == null ? null : relateId.trim();
    }

    public String getStorageOutTime() {
        return storageOutTime;
    }

    public void setStorageOutTime(String storageOutTime) {
        this.storageOutTime = storageOutTime == null ? null : storageOutTime.trim();
    }

    public String getStorageOutUser() {
        return storageOutUser;
    }

    public void setStorageOutUser(String storageOutUser) {
        this.storageOutUser = storageOutUser == null ? null : storageOutUser.trim();
    }

    public String getStorageOutCount() {
        return storageOutCount;
    }

    public void setStorageOutCount(String storageOutCount) {
        this.storageOutCount = storageOutCount == null ? null : storageOutCount.trim();
    }

    public String getStorageOutStatusCn() {
        return STATUSMAP.get(getStorageOutStatus());
    }
    public String getStorageOutStatus() {
        return storageOutStatus;
    }

    public void setStorageOutStatus(String storageOutStatus) {
        this.storageOutStatus = storageOutStatus == null ? null : storageOutStatus.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}